package com.square.service.auth.consumer.fallback;

import com.baomidou.mybatisplus.extension.api.R;
import com.square.service.auth.consumer.feign.AuthFeign;
import com.square.service.common.handler.ApiCode;
import org.springframework.stereotype.Component;

/**
 * @author : 王苏
 * @since : 2021/4/20 15:21
 */
@Component
public class AuthFeignFallback implements AuthFeign {
    @Override
    public R<?> doGetAuthenticationInfo(String token) {
        return R.failed(ApiCode.AUTH_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> doGetAuthorizationInfoForRoles(String userKey, String[] value) {
        return R.failed(ApiCode.AUTH_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> doGetAuthorizationInfoForPermissions(String userKey, String[] value) {
        return R.failed(ApiCode.AUTH_SERVICE_EXCEPTION);
    }
}
